#pragma once
#include <iostream>
#include "bObject.h"
#include "bIterable.h"
#include "bBuffered.h"

class bString :public bBuffered,virtual public bObject
{
private:
	char* ptr;
	void ensure_elements(const unsigned long int);
	void delete_elements();
public:
	bString(void);
	bString(const char*);
	bString(const char*,unsigned long int);
	bString* insert(const unsigned long int, const char);
	bString* insert(const unsigned long int,const char*,unsigned long int);
	bString* insert(const unsigned long int,const char*);
	bString* append(const char);
	bString* append(const char*,unsigned long int);
	bString* append(const char*);
	bString* prepend(const char);
	bString* prepend(const char*,unsigned long int);
	bString* prepend(const char*);
	unsigned long int find(const char,unsigned long int=0) const;
	unsigned long int find(const char*,unsigned long int,unsigned long int=0) const;
	unsigned long int find(const char*,unsigned long int=0) const;
	const bool operator == ( const char* ) const;
	const bool operator != ( const char* ) const;
	const bool similar( const char*, unsigned long int) const;
	const bool similar( const char* ) const;
	char& operator [] ( unsigned long int );
	operator const char* () const;
	virtual ~bString(void);
};

std::ostream& operator << (std::ostream&,bString*);